<template>
    <div class="iframe">
        <iframe :src="url" frameborder="0" width="100%" style="min-height: 50vh;"></iframe>
    </div>
</template>

<script>
import { mapState } from 'vuex';
import { getDictSelectList } from '@/utils/Common';
import { getToken, getTokenHsbankNo } from '@/utils/auth';
export default {
    name: 'PointSystemCommonList',
    data() {
        return {
            url: '',
        };
    },
    computed: mapState({
        cardInfo_3004: state => state.common.cardInfo_3004,
        defaultParams: state => state.common.defaultParams,
    }),
    async mounted() {
        const bankCode = getTokenHsbankNo('HsbankNo'); // 银行号
        const creditsCard = this.cardInfo_3004.CARDNO.trim() || ''; // 卡号
        const identitycard = this.cardInfo_3004.CUSTID; // 证件号
        const sysAdmin = this.defaultParams.body.appHead.opeNo; // 操作员号
        const URLSJF = await getDictSelectList('URLSJF', this);
        let code = null;
        if (this.$route.path === '/pointsSystem/OrderList') {
            code = '8';
        } else if (this.$route.path === '/pointsSystem/GoodsList') {
            code = '7';
        } else {
            code = '9';
        }
        URLSJF.forEach((item) => {
            if (item.code === code) {
                this.url = `${item.label}bankCode=${bankCode}&creditsCard=${creditsCard}&identitycard=${identitycard}&sysAdmin=${sysAdmin}`;
            }
        });
    },
    methods: {

    },
};
</script>

<style scoped>
</style>
